﻿<local:DocumentBase x:Class="WPFExcelReport.JLTVK16"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"       
       Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Width="1021">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="512*"></ColumnDefinition>
            <ColumnDefinition Width="463*"></ColumnDefinition>
            <ColumnDefinition Width="49*" />
        </Grid.ColumnDefinitions>        
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,19,66">
            <WrapPanel Width="950">
                <Label Content="任务书号："    Width="86" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtART" Width="110" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="1"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="订单交期从" HorizontalAlignment="Left" Margin="10,0,0,0" Name="label3" VerticalAlignment="Center" Width="90" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0" Name="FROM_DN_DATE" VerticalAlignment="Center" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DN_DATE_SelectedDateChanged" Width="105" />
                <Label Content="到" HorizontalAlignment="Left" Margin="5,0,0,0" Name="label4" VerticalAlignment="Center" Width="25" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,0,0,0" Name="END_DN_DATE" VerticalAlignment="Center" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DN_DATE_SelectedDateChanged" Width="105" />
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="65" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="65" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,35,19,-41" Grid.RowSpan="4" Grid.ColumnSpan="2">
            
            <WrapPanel Width="955" Height="569">
                <DataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True" 
            AutoGenerateColumns="False"   HeadersVisibility="Column"
                  EnableRowVirtualization="True"   
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,5,0,0" Grid.RowSpan="3" Grid.Row="1">
<!--ARTICLE	COLOR	QTY	UNIT	DELDATE	GDATE	FDATE	EDATE	JDATE	CDATE -->
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="任务书号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="颜色" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="订单量" Width="auto" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=UNIT}" Header="单位" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=DELDATE}" Header="订单交期" Width="auto" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=GDATE}" Header="坯布完成日期" Width="auto" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=FDATE}" Header="整理完成日期" Width="auto" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=EDATE}" Header="研发给销售日期" Width="auto" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=JDATE}" Header="销售寄样日期" Width="auto" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=CDATE}" Header="客户确认日期" Width="auto" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=RSJSDATE}" Header="染色经纱结束" Width="auto" MinWidth="50" Visibility="Hidden"/>
                        <DataGridTextColumn Binding="{Binding Path=RSWSDATE}" Header="染色纬纱结束" Width="auto" MinWidth="50" Visibility="Hidden"/>
                        <DataGridTextColumn Binding="{Binding Path=MDATE}" Header="销售寄样" Width="auto" MinWidth="50" Visibility="Hidden"/>
                        <DataGridTextColumn Binding="{Binding Path=LDATE}" Header="样内部确认" Width="auto" MinWidth="50" Visibility="Hidden"/>
                        <DataGridTextColumn Binding="{Binding Path=KDATE}" Header="样外部确认" Width="auto" MinWidth="50" Visibility="Hidden"/>


                    </DataGrid.Columns>
                </DataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
